home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: Need help with SPAWN use!
- Date: Sun, 21 Jan 96 22:07:02 GMT
- Organization: none
- Message-ID: <822262022snz@genesis.demon.co.uk>
- References: <4drda0$okm@is05.micron.net>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4drda0$okm@is05.micron.net> ssharpe@micron.net "ssharpe" writes:
-
- >I'm trying to execute PKZIP from within my C program and errno
- >consistently reports -1. I'm using Turbo C/C++ V3.0. I tried the
- >system command (system("pkzip");) without success and I tried spawn
- >(spawnlp(P_WAIT,"pkzip",NULL);). Pkzip is in my DOS path.
-
- As far as the C language goes the value of errno after a call to system()
- is not defined. Maybe it is being set to -1 by the system() on your
- implementation or maybe it is just a hold-over from an earlier library
- call. Either way it makes no sense to test errno unless its value is
- defined by yuor implementation (and doing so is not portable). Check the
- documentation that comes with your particular compiler. spawnlp() is not
- defined by the C language. You'd probably be better off discussing this in
- comp.os.msdos.programmer.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-